package com.xujie.sportsmeeting.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * 报名信息VO
 */
@Data
@Schema(description = "报名信息VO")
public class RegistrationVO {
    
    @Schema(description = "报名ID")
    private Long id;
    
    @Schema(description = "项目ID")
    private Long eventId;
    
    @Schema(description = "运动员ID")
    private Long athleteId;
    
    @Schema(description = "运动员姓名")
    private String athleteName;
    
    @Schema(description = "运动员学号")
    private String athleteNumber;
    
    @Schema(description = "学号")
    private String studentNumber;
    
    @Schema(description = "运动员性别")
    private Integer athleteGender;
    
    @Schema(description = "所属院系")
    private String department;
    
    @Schema(description = "所属班级")
    private String className;
    
    @Schema(description = "联系电话")
    private String phone;
    
    @Schema(description = "项目名称")
    private String eventName;
    
    @Schema(description = "项目编码")
    private String eventCode;
    
    @Schema(description = "项目类型")
    private Integer eventType;
    
    @Schema(description = "性别限制")
    private Integer genderLimit;
    
    @Schema(description = "年龄分组")
    private String ageGroup;
    
    @Schema(description = "成绩单位")
    private String unit;
    
    @Schema(description = "比赛时间")
    private LocalDateTime competitionTime;
    
    @Schema(description = "比赛地点")
    private String venue;
    
    @Schema(description = "报名编号")
    private String registrationNumber;
    
    @Schema(description = "团队名称")
    private String teamName;
    
    @Schema(description = "报名时间")
    private LocalDateTime registrationTime;
    
    @Schema(description = "审核状态 0-待审核 1-审核通过 2-审核拒绝")
    private Integer auditStatus;
    
    @Schema(description = "审核时间")
    private LocalDateTime auditTime;
    
    @Schema(description = "审核人ID")
    private Long auditUserId;
    
    @Schema(description = "审核人姓名")
    private String auditUserName;
    
    @Schema(description = "审核备注")
    private String auditRemark;
    
    @Schema(description = "参赛号码")
    private String raceNumber;
    
    @Schema(description = "报名备注")
    private String remarks;
    
    @Schema(description = "状态 0-取消 1-正常")
    private Integer status;
    
    @Schema(description = "创建时间")
    private LocalDateTime createTime;
    
    @Schema(description = "更新时间")
    private LocalDateTime updateTime;
    
    /**
     * 获取审核状态文本
     */
    public String getAuditStatusText() {
        if (auditStatus == null) return "-";
        return switch (auditStatus) {
            case 0 -> "待审核";
            case 1 -> "审核通过";
            case 2 -> "审核拒绝";
            default -> "未知";
        };
    }
    
    /**
     * 获取审核状态标签类型
     */
    public String getAuditStatusTagType() {
        if (auditStatus == null) return "";
        return switch (auditStatus) {
            case 0 -> "warning";
            case 1 -> "success";
            case 2 -> "danger";
            default -> "";
        };
    }
    
    /**
     * 获取状态文本
     */
    public String getStatusText() {
        if (status == null) return "-";
        return switch (status) {
            case 0 -> "取消";
            case 1 -> "正常";
            default -> "未知";
        };
    }
}